The present invention relates generally to computer devices, and more particularly computer devices arranged to receive handwritten input.
Contemporary computing devices allow users to enter handwritten words (e.g., in cursive handwriting and/or printed handwritten characters) and symbols (e.g., a character in Far East languages). The words and symbols can be used as is, e.g., to function as readable notes and so forth, or can be converted to text for more conventional computer uses. To convert to text, for example, as a user writes strokes representing words or other symbols onto a touch-sensitive computer screen or the like, a handwriting recognizer (e.g., trained with millions of samples, employing a dictionary, context and other rules) is able to convert the handwriting data into dictionary words or symbols. In this manner, users are able to enter textual data without necessarily needing a keyboard.
Contemporary handwriting recognizers are not one hundred percent accurate in recognizing words. Because of this, one type of recognizer returns a list of alternates, ranked according to probability by the recognizer. Via a user interface, systems may provide a list of these alternates, from which the user can select a different word instead of the word the recognizer initially guessed as the one that the user most likely intended.
However, words in a word processing system are often edited, including moving around the words, having letters therein deleted, inserted, replaced with others, and so forth. Also, selected words may be toggled between handwritten data that the user entered and a recognized (e.g., text) state. An efficient, robust and flexible mechanism for maintaining the alternates in association with the word that does not lose the alternates as words are edited or undergo state changes is needed.
Briefly, the present invention provides a mechanism that maintains an association between alternates for a given ink word, regardless of the handwritten or text state of the word, and regardless of the position of the word as it may be edited in a document.
In one implementation, handwritten data is maintained in an ink word data structure. Once the word is recognized and an alternate is selected for it, (converted to text), the first character of the word remains as an ink word (in a text buffer) pointing to the data structure, with a Show Recognized flag (tsShowRecognized) set in the data structure indicating that the word is now recognized as text. In this state, the first character is displayed to the user as a recognized text letter instead of as the handwritten word. The other characters that make up the recognized word are inserted as text into the text buffer. Any alternates returned by the recognizer are thus stored (directly or indirectly via a pointer) with the ink word data structure displayed as this first character of a recognized word, which also maintains the ink data, e.g., the stroke information entered by a user or the like. Then, if the user edits the word, e.g., moves it, the alternates and also the ink data move with the word. In one implementation, the alternates and stroke data are lost if the user deletes the first character of the recognized word. In an alternative implementation, this data effectively can be moved to another, remaining character in the word.
Other alternatives include maintaining an invisible text element or token that points to the original ink word and remains associated with the full text of the word, e.g., the token (before, within or after the word) moves with the word. In another alternative, the recognized word can have the first character placed in the text buffer along with the other recognized characters, with the pointer to the ink word data remaining in the text buffer in association with the recognized word, but the ink word data structure having a flag set therein indicating that it should be considered hidden. Another alternative mechanism maintains the entire recognized text word in an ink word data structure. In this alternative, the word processing/editing software is modified to edit the words within the ink word data structure. Yet another possible alternative includes maintaining a separate data structure comprising a table or the like that associates the location of characters in a text buffer with a separately maintained list of alternates. Note that one problem with these alternatives is that existing word/ink processing code may need to be modified.
Other advantages will become apparent from the following detailed description when taken in conjunction with the drawings, in which: